package com.ymatou.iapi.trading.operate.service;

import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;
/**
*删除订单Call
*FreeMaker Template自动生成代码
*/
public class MarkOrderDeletedCall extends YmatouBaseCall{
	private static String opurl ="api/Buyer/markOrderDeleted";
	
	public MarkOrderDeletedCall() {
		super(EnvSetup.getSystemUrl("operate_iapi"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	/**
     * 获取Success
     * 
     * @return
     */
    public String getSuccess() {
        String Success = null;
        try {
        	Success = new JSONObject(getReturnData()).getString("success");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return Success;
    }
    
    /**
     * 获取errorMessage
     * 
     * @return
     */
    public String getErrorMessage() {
        String errorMessage = null;
        try {
        	errorMessage = new JSONObject(getReturnData()).getString("errorMessage");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return errorMessage;
    }
}